# -*- coding: utf-8 -*-
import sys
import threading
import re

try:
    import pygtk
    pygtk.require("2.0")
    import gtk
    import gtk.glade    
except ImportError,cause:
    sys.stderr.write("ImportError: Module is not present %s" % cause)
    sys.exit(1)

def message_dialog(message,msg_type = gtk.MESSAGE_INFO):
    dialog = gtk.MessageDialog(None,gtk.DIALOG_MODAL,msg_type,gtk.BUTTONS_OK,message)
    dialog.run()
    dialog.destroy()
    
# Threaded property
def threaded(f):
    def wrapper(*args):
        t = threading.Thread(target=f, args=args)
        t.start()
    return wrapper
